POV-Ray : Newsgroups : povray.general : Rendering part of an image in black and white : Re: Rendering part of an image in black and white Server Time
4 Aug 2024 00:23:00 EDT (-0400)
  Re: Rendering part of an image in black and white  
From: ABX
Date: 26 Aug 2003 06:40:34
Message: <7hdmkvsdtnoqc06ut5rld340q39njfonh5@4ax.com>
On Tue, 26 Aug 2003 10:30:53 +0100, Kaveh Bazargan <kav### [at] maccom> wrote:
> So imagine a rendered scene which is in full color, except a part of it 
> which is scene through a special glass filter which is held up.

1. Render your scene in color into image.png.
2. Render your mask.png with area of glass filter as white and rest in black.
3. Create scene like:

  #version 3.5;
  global_settings{assumed_gamma 1.0}
  #include "screen.inc" /* http://www.povray.org/documentation/view/288/ */
  #declare Image=pigment{image_map{"image.png"}};
  #declare f_Image=function{pigment{Image}};
  #declare Processed=texture{
    pigment{
      image_pattern{"mask.png}
      pigment_map{
        [0 Image]
        [1 function{f_Image(x,y,z).gray}]
      }
    }
    finish{ambient 1 diffuse 0}
  }
  Screen_Plane(Processed, 1, 0, 1)

not tested but should work the way I understand your problem.

ABX


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.